home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 5.0 KB | 190 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWResFil.cpp
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #include "FWOS.hpp"
-
- #ifndef FWRESFIL_H
- #include "FWResFil.h"
- #endif
-
- #ifndef FWSTRS_H
- #include "FWStrs.h"
- #endif
-
- #ifndef FWFILESP_H
- #include "FWFileSp.h"
- #endif
-
- #ifndef FWEXCDEF_H
- #include "FWExcDef.h"
- #endif
-
- #ifndef FWPRIDEB_H
- #include "FWPriDeb.h"
- #endif
-
- #ifndef FWEXCEPT_H
- #include "FWExcept.h"
- #endif
-
- //----------------------------------------------------------------------------------------
- // Mac-only
- //----------------------------------------------------------------------------------------
- #ifdef FW_BUILD_MAC
-
- #ifndef __ERRORS__
- #include <errors.h>
- #endif
-
- #ifndef __TOOLUTILS__
- #include <ToolUtils.h>
- #endif
-
- #ifndef __RESOURCES__
- #include <Resources.h>
- #endif
-
- #ifndef __MENUS__
- #include <Menus.h>
- #endif
-
- #ifndef __STRING__
- #include <string.h>
- #endif
-
- #ifndef __MEMORY__
- #include <Memory.h>
- #endif
-
- #endif
-
- #ifdef FW_BUILD_MAC
- #pragma segment fwresour
- #endif
-
- //========================================================================================
- // Template instantiations
- //========================================================================================
-
- #include "FWSOMPtr.tpp"
-
- FW_DEFINE_AUTO_TEMPLATE(FW_TCountedSOMPtr, FW_OResourceFile)
-
- #if FW_USE_TEMPLATE_PRAGMAS
- #pragma template_access public
- #pragma template FW_TCountedSOMPtr<FW_OResourceFile>
- #endif
-
- #if FW_ANSI_TEMPLATE_INSTANTIATION
- template class FW_TCountedSOMPtr<FW_OResourceFile>;
- #endif
-
- //========================================================================================
- // CLASS FW_PResourceFile
- //========================================================================================
-
- FW_DEFINE_AUTO(FW_PResourceFile)
-
- //----------------------------------------------------------------------------------------
- // FW_PResourceFile::FW_PResourceFile
- //----------------------------------------------------------------------------------------
-
- FW_PResourceFile::FW_PResourceFile()
- {
- FW_END_CONSTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_PResourceFile::FW_PResourceFile
- //----------------------------------------------------------------------------------------
-
- FW_PResourceFile::FW_PResourceFile(Environment* ev, FW_OResourceFile *rep)
- {
- SetRep(ev, rep);
- FW_END_CONSTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_PResourceFile::FW_PResourceFile
- //----------------------------------------------------------------------------------------
-
- FW_PResourceFile::FW_PResourceFile(Environment* ev, FW_OFileSpecification* newFileSpec)
- {
- FW_OResourceFile* rep = new FW_OResourceFile();
-
- SetRep(ev, rep);
- rep->InitFromFileSpec(ev, newFileSpec);
- FW_END_CONSTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_PResourceFile::FW_PResourceFile
- //----------------------------------------------------------------------------------------
-
- FW_PResourceFile::FW_PResourceFile(Environment* ev, FW_ResourceFileID resFileID)
- {
- FW_OResourceFile* rep = new FW_OResourceFile();
-
- SetRep(ev, rep);
- rep->InitFromResFileID(ev, resFileID);
- FW_END_CONSTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_PResourceFile::FW_PResourceFile
- //----------------------------------------------------------------------------------------
-
- FW_PResourceFile::FW_PResourceFile(const FW_PResourceFile& other)
- {
- FW_SOMEnvironment ev;
-
- SetRep(ev, other);
- FW_END_CONSTRUCTOR
- }
-
- //----------------------------------------------------------------------------------------
- // FW_PResourceFile::~FW_PResourceFile
- //----------------------------------------------------------------------------------------
-
- FW_PResourceFile::~FW_PResourceFile()
- {
- FW_START_DESTRUCTOR
- }
-
-
- //========================================================================================
- // FW_CMacResLoadFalse
- //========================================================================================
-
- #if defined FW_BUILD_MAC
- FW_DEFINE_AUTO(FW_CMacResLoadFalse)
- #endif
-
- //----------------------------------------------------------------------------------------
- // FW_CMacResLoadFalse::FW_CMacResLoadFalse
- //----------------------------------------------------------------------------------------
- #if defined FW_BUILD_MAC
- FW_CMacResLoadFalse::FW_CMacResLoadFalse()
- {
- ::SetResLoad(false);
- FW_END_CONSTRUCTOR
- }
- #endif
-
- //----------------------------------------------------------------------------------------
- // FW_CMacResLoadFalse::~FW_CMacResLoadFalse
- //----------------------------------------------------------------------------------------
- #if defined FW_BUILD_MAC
- FW_CMacResLoadFalse::~FW_CMacResLoadFalse()
- {
- FW_START_DESTRUCTOR
- ::SetResLoad(true);
- }
- #endif
-